home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / DB_CLIPP / 2510.ZIP / TRSOURCE.EXE / _TR_HTOD.C < prev    next >
C/C++ Source or Header  |  1990-10-22  |  646b  |  36 lines

  1. /*********
  2. * _TR_HTOD.C
  3. *
  4. * by Ralph Davis
  5. *
  6. * Placed in the public domain by Tom Rettig Associates, 10/22/1990.
  7. *
  8. *  Syntax:  _tr_htod( <expC> )   <expC> is hexadecimal string
  9. *  Return:  <expC> as a double precision number
  10. *
  11. *  C Syntax:
  12. *
  13. *        double _tr_htod(s);
  14. *        char *s;
  15. *
  16. *  Assembler usage:
  17. *
  18. *        MOV   AX,SEG <expC>
  19. *        MOV   BX,OFF <expC>
  20. *        PUSH  AX
  21. *        PUSH  BX
  22. *        CALL  _TR_HTOD
  23. *        ADD   SP,4
  24. *
  25. *     Returns 8-byte floating-point number in AX:BX:CX:DX
  26. *********/
  27.  
  28. #include "trlib.h"
  29.  
  30. double _tr_htod(s)
  31. char *s;
  32. {
  33.     return ((double) _tr_htol(s));
  34. }
  35.  
  36.